import VueRouter from 'vue-router'
import Layout from '@/layout/layout'
import User from '@/pages/User'
import Login from '@/pages/Login'
import Register from '@/pages/Register'
import Book from '@/pages/Book'
import News from '@/pages/News'
import Question from '@/pages/Question'
import Paper from '@/pages/Paper'
import Course from '@/pages/Course'
import Exam from '@/pages/Exam'
import Sign from '@/pages/Sign'
import StudentPaper from '@/pages/StudentPaper'
import HandlePaper from '@/pages/HandlePaper'
import Comment from '@/pages/Comment'
import Appointment from '@/pages/Appointment'
import AppointmentSign from '@/pages/AppointmentSign'
import Activity from '@/pages/Activity'
import ActivitySign from '@/pages/ActivitySign'
import Person from '@/pages/Person'
import SetPassword from '@/pages/SetPassword'
import Home from '@/pages/Home'

export default new VueRouter({
    routes: [{
        path: '/',
        component: Layout,
        redirect:'/home',
        children: [
            {
                path: 'user',
                component: User,
            },
            {
                path: 'person',
                component: Person,
            },
            {
                path: 'book',
                component: Book,
            },
            {
                path: 'news',
                component: News,
            },
            {
                path: 'question',
                component: Question,
            },
            {
                path: 'paper',
                component: Paper,
            },
            {
                path: 'course',
                component: Course,
            },
            {
                path: 'exam',
                component: Exam,
            },
            {
                path: 'sign',
                component: Sign,
            },
            {
                path: 'studentPaper',
                component: StudentPaper,
            },
            {
                path: 'handlePaper',
                component: HandlePaper,
            },
            {
                path: 'comment',
                component: Comment,
            },
            {
                path: 'appointment',
                component: Appointment,
            },
            {
                path: 'appointmentSign',
                component: AppointmentSign,
            },
            {
                path: 'activity',
                component: Activity,
            },
            {
                path: 'activitySign',
                component: ActivitySign,
            },
            {
                path: 'setPassword',
                component: SetPassword,
            },
            {
                path: 'home',
                component: Home,
            },
        ]
    },
    {
        path: '/login',
        component: Login,
    },{
        path: '/register',
        component: Register,
    },]
})